  ________       __          ________                          ___ ___                __    
 /  _____/______|__| _____   \______ \ _____ __  _  ______    /   |   \  ____   ____ |  | __
/   \  __\_  __ \  |/     \   |    |  \\__  \\ \/ \/ /    \  /    ~    \/  _ \ /  _ \|  |/ /
\    \_\  \  | \/  |  | |  \  |    `   \/ __ \\     /   |  \ \    Y    (  <_> |  <_> )    < 
 \______  /__|  |__|__|_|  / /_______  (____  /\/\_/|___|  /  \___|_  / \____/ \____/|__|_ \
        \/               \/          \/     \/           \/         \/                    \/
    
    Grim Dawn Hook (c) 2015 atom0s [atom0s@live.com]

----------------------------------------------------------------------------------------------------

Before you start making addons, be sure to read this documentation to understand what is required
of your addon in order for it to work properly. Failure to follow what this doc says can cause
your addon to fail to load, or not work at all!

----------------------------------------------------------------------------------------------------

>> Creating Your Addon

    Addons can be found inside of the \GDHook\Scripts\addons\ folder. Inside here you will see
    various folders for each addon as well as a 'libs' folder for various libraries addons can 
    make use of while running.

    Please be sure to follow these instructions as they are required!
        - Addons must each have their own folder.
        - Addons must have at least one file with the same name as their folder.

    For example, if you want to make an addon called HelloWorld, you would have to make the following:
        - \GDHook\Scripts\addons\HelloWorld                   (folder)
        - \GDHook\Scripts\addons\HelloWorld\helloworld.lua    (file)
        
    Failure to do so will cause your addon to not load. The folder name does not have to be capital either.
    
    The name of the folder and file is the name that you (and others) will use with the /addon commands.
    
----------------------------------------------------------------------------------------------------

>> Coding Your Addon

    Once you have created your addons folder and main Lua file, open the file in your favorite editor.
    
    At the top of the file, you should include your license agreement. This helps protect your work as
    well as signify who made it. This is not required but just recommended.
    
    Commonly used licenses are GPL v2, GPL v3, or MIT. You can use any open source license you want.
    
    Next, you should add the main addon table entries. These are what the plugin use to determine the
    various information about your plugin. This table is named _addon and is internally created for your
    addon. You just need to fill out the following. (THESE ARE REQUIRED!)
    
        _addon.name = 'Your addon name here.';
        _addon.author = 'Your name here';
        _addon.version = '1.0';
        
    Failure to fill these out will cause your addon to not load!
    
    At this point your addon meets the requirements to be loaded.

----------------------------------------------------------------------------------------------------

>> Registering To Events

    Now that your addon can load successfully it is time to register to events. Events are used by
    the Addons plugin to inform plugins of various things happening. While it is not required to 
    register to any events, avoiding them will make your addon fairly plain and only execute once
    when it is loaded.
    
    Events are invoked by the Addons plugin for all addons that register to each event. You can pick
    and choose which events you want to register to, that is entirely up to you. 
    
    You can find more info about each event in the event documentation page.
    
    As a general guide, this is how you would register to an event:
    
        hook.register_event('load', function()
            print('Load event was called!');
        end);
        
    This method is considered the short-hand method. This means that we are directly putting the function
    inside of the call that expects a function. You can also write the register_event call like this:
    
        function addon_loaded()
            print('Load event was called!');
        end
        hook.register_event('load', addon_loaded);